<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

	<h:panelGroup rendered="#{not hideTitle}">
		<strong>#{messages['operation_permit.approval']}</strong>
		<rich:separator lineType="solid" />
		<br />
	</h:panelGroup>
	
	<h:panelGroup rendered="#{readonly}">
		<h:panelGrid columns="2">
			<h:outputText value="#{messages['txt.issueDate']}" style="font-weight:bold;" rendered="#{readonly}" />
			<h:outputText value="#{operationPermitHelper.permit.issueDate}" rendered="#{readonly}" />

			<h:outputText value="#{messages['txt.current_state']}" style="font-weight:bold;"/>
			<h:panelGroup>
				<h:panelGroup rendered="#{operationPermitHelper.permit.approved != null}">
					<h:outputText rendered="#{operationPermitHelper.permit.approved}" value="#{messages['txt.APPROVED']}" />
					<h:outputText
						rendered="#{not operationPermitHelper.permit.approved}"
						value="#{messages['txt.REJECTED']}"
						style="color:Red;">
					</h:outputText>
				</h:panelGroup>
				<h:outputText
					rendered="#{operationPermitHelper.permit.approved == null}"
					value="#{messages['txt.pending_state']}"
					style="color:Red;">
				</h:outputText>
			</h:panelGroup>
		</h:panelGrid>
		<br />
	</h:panelGroup>

	<h:outputText
		value="#{messages['viewtransaction.approver_observations']}"
		style="font-weight:bold;" />
	<rich:separator lineType="solid" />
	<br />
	
	<h:panelGroup rendered="#{not readonly}">
		<h:inputTextarea id="approverOpinion"
			value="#{operationPermitHelper.permit.approverOpinion}"
			label="#{messages['viewtransaction.approver_observations']}"
			rows="5" style="width:70%" required="true">
		</h:inputTextarea>
		<br />
		<rich:message style="color:Red;" for="approverOpinion" />
	</h:panelGroup>
	<h:panelGroup rendered="#{readonly}">
		<h:inputTextarea
			value="#{operationPermitHelper.permit.approverOpinion}"
			rows="5" style="width:70%" readonly="true">
		</h:inputTextarea>
	</h:panelGroup>

	<br /> <br /> <br />

</ui:composition>
